<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>首页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script src="__ROOT__/static/home/js/shop/rem.js"></script>
    <script src="__ROOT__/static/home/js/shop/jquery.min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/base.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/page.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/all.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/loading.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/slick/slick.css"/>
    <link rel="stylesheet" type="text/css" href="__ROOT__/static/home/css/shop/goodscats.css"/>

    <script type="text/javascript">
        $(window).load(function(){
            $(".loading").addClass("loader-chanage")
            $(".loading").fadeOut(300)
        })

        $(document).ready(function () {
            //返回顶部按钮
            var speed = 1000;//自定义滚动速度
            //动态获取滚动条高度以达到效果
            $(window).scroll(function(){
                var scrollHeight = $(this).scrollTop();
//            console.log(scrollHeight);
                if(scrollHeight>=300){
                    $("#back_header").css('display','block');
                }else{
                    $("#back_header").css('display','none');
                }
            });
            //回到顶部
            $( "#back_header").click( function () {
                $( "html,body").stop().animate({ "scrollTop" : 0 }, speed);
            });
        });
    </script>
</head>
<!--loading页开始-->
<div class="loading">
    <div class="loader">
    <div class="loader-inner pacman">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</div>
</div>
<!--loading页结束-->
<body>
<!--header star-->
<header class="mui-bar mui-bar-nav" id="header">
    <a class="btn" href="javascript:history.go(-1)">
        <i class="iconfont icon-fanhui"></i>
    </a>
    <form action="{:url('home/Goodscats/searchGoods')}" method="post" class="goods_form">
        <div class="form_out">
            <div class="form_inner_left">
                <input type="text" name="goods_name" id="" value="" class="sch-txt left-input" placeholder="输入您要搜索的商品"/>
            </div>
            <div class="form_inner_right">
                <button type="submit" class="inner_right_btn">
                    <i class="fdj iconfont icon-sousuo"></i>
                    <!--搜索-->
                </button>
            </div>
        </div>
    </form>
</header>
<!--header end-->

<div   id="main"    class="clearfloat warp" style="margin-top: 50px;">
    <div class="mui-content">
        <!--banner开始-->
        <div class="banner swiper-container">
            <div class="swiper-wrapper">
                {volist name='img' id='vo'}
                <div class="swiper-slide"><a href="{:url('home/Cart/goodsInfo',array('id'=>$vo.id))}"><img class="swiper-lazy" data-src="__ROOT__/{$vo.imgs_url}" alt=""></a></div>
                {/volist}
            </div>
        </div>
        <!--banner结束-->
        <!--第一栏分类开始-->
        <div class="cation clearfloat box-s">
            <ul>
                <li>
                    <a href="#001">
                        <img src="__ROOT__/upload/shoppimg/icon1.png"/>
                        <p>主题专区</p>
                    </a>
                </li>
                <li>
                    <a href="#002">
                        <img src="__ROOT__/upload/shoppimg/icon4.png"/>
                        <p>今日必抢</p>
                    </a>
                </li>
                <li>
                    <a href="#003">
                        <img src="__ROOT__/upload/shoppimg/icon2.png"/>
                        <p>精品热卖</p>
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img src="__ROOT__/upload/shoppimg/icon3.png"/>
                        <p>猜你喜欢</p>
                    </a>
                </li>
            </ul>
        </div>
        <!--第一栏分类结束-->

        <!--boutique star-->
        <div class="boutique clearfloat box-s ">
            <div class="boutit clearfloat">
                <span></span>
                <samp>主题推送</samp>
            </div>
            <div class="content clearfloat">
                <ul>
                    {volist name="theme" id="vo"}
                    <li>
                        <a name="001" id="001" href="{:url('home/Cart/goodsInfo',array('id'=>$vo.id))}">
                            <img  class="lazy" data-original="__ROOT__{$vo.goods_url}" src="__ROOT__/static/plugins/lazyload/grey.gif"/>
                        </a>
                    </li>
                    {/volist}
                </ul>
            </div>
        </div>
        <!--boutique end-->

        <!--seller star-->
        <div class="seller clearfloat">
            <div class="boutit clearfloat">
                <span></span>
                <samp>今日必抢</samp>
            </div>
            <div class="content clearfloat">
                <ul>
                    {volist name="active" id="vo"}
                    <li style="width:50%;float: left">
                        <div class="top clearfloat box-s">
                            <p class="tit over">{$vo.goods_name}</p>
                            <span class="over db">￥{$vo.goods_price}</span>
                        </div>
                            <div class="tu">
                            <a name="002" id="002" href="{:url('home/Cart/goodsInfo',array('id'=>$vo.id))}">
                                <img style="width:90%;height:100px;"  class="lazy" data-original="__ROOT__{$vo.goods_url}" src="__ROOT__/static/plugins/lazyload/grey.gif"/>
                            </a>
                            </div>
                    </li>
                    {/volist}
                </ul>
            </div>
        </div>
        <!--seller end-->

        <!--onnew star-->
        <div class="onnew clearfloat">
            <div class="boutit clearfloat">
                <span></span>
                <samp>精选特卖</samp>
            </div>
            <div class="content clearfloat">
                <div class="top clearfloat">
                    <div class="list clearfloat fl box-s" style="width:100%;height:auto;background-color: #EFEFF4;">
                        <ul>
                            {volist name="specials" id="vo"}
                            <li style="width:50%;float: left">
                                <div class="top clearfloat box-s">
                                    <p class="tit over">{$vo.goods_name} </p>
                                    <span class="over db"><span style="color:red;">￥</span>:{$vo.goods_price} 销量:{$vo.initial_stock-$vo.goods_stock}</span>
                                </div>
                                <div class="tu" style="width: 100%;">
                                    <a name="003" id="003" href="{:url('home/Cart/goodsInfo',array('id'=>$vo.id))}">
                                        <img  class="lazy" data-original="__ROOT__{$vo.goods_url}" src="__ROOT__/static/plugins/lazyload/grey.gif"/>
                                    </a>
                                </div>
                            </li>
                            {/volist}
                        </ul>
                    </div>
                </div>
            </div>
        </div>


        <!--onnew end-->

        <!--theme star-->

        <!--like end-->
    </div>
</div>

<div class="back_header" id="back_header" style="display: none;"><img src="__ROOT__/static/home/images/back_header.png" alt=""/></div>

<!--footer star-->
<footer class="page-footer fixed-footer" id="footer">
    <ul>
        <li class="active">
            <a href="{:url('home/Index/index')}">
                <i class="iconfont icon-shouye"></i>
                <p>首页</p>
            </a>
        </li>
        <li>
            <a href="{:url('home/Goodscats/goodsCatsList')}">
                <i class="iconfont icon-icon04"></i>
                <p>分类</p>
            </a>
        </li>
        <li>
            <a href="javascript:;"   onclick="seeCart()" >
                <i class="iconfont icon-gouwuche"></i>
                <p>购物车</p>
            </a>
        </li>
        <li>
            <a href="{:url('home/Userinfo/index')}">
                <i class="iconfont icon-yonghuming"></i>
                <p>个人中心</p>
            </a>
        </li>
    </ul>
</footer>
<!--footer end-->
<script type="text/javascript" src="__ROOT__/static/home/js/shop/jquery-1.8.3.min.js" ></script>
<script src="__ROOT__/static/home/js/shop/others.js"></script>
<script type="text/javascript" src="__ROOT__/static/home/js/shop/hmt.js" ></script>
<script src="__ROOT__/static/home/js/shop/slick.js" type="text/javascript" ></script>
<!--插件-->
<link rel="stylesheet" href="__ROOT__/static/home/css/shop/swiper.min.css">
<script src="__ROOT__/static/home/js/shop/swiper.jquery.min.js"></script>
<script type="text/javascript" src="__ROOT__/static/plugins/lazyload/jquery.lazyload.min.js"></script>
<!--新闻资讯滚动-->
<script type="text/javascript">
    $(function () {
        $("img.lazy").lazyload();
    });


    $('.autoplay').slick({
        slidesToShow: 1,
        slidesToScroll: 1,
        autoplay: true,
        autoplaySpeed: 2000,
    });
    //查看购物车
    function seeCart(){
        $.post("{:url('home/Cart/seeCart')}",function(data){
            if( data >0){
                window.location.href="{:url('home/Cart/cartList')}";
            }else if( data==-1){
                layer.open({content: '请先登录用户',skin: 'msg',time: 3 });
                setTimeout('window.location.href="{:url(\'home/login/login\')}"',3000);
            }

        })
    }
</script>

</body>

</html>